//
//  LTOVEButtionViewController.m
//  LTOVECustom
//
//  Created by LTOVE on 2017/1/22.
//  Copyright © 2017年 LTOVE. All rights reserved.
//

#import "LTOVEButtionViewController.h"

#import "UIViewController+BackButtonHandler.h"

@interface LTOVEButtionViewController ()
@property(nonatomic,strong)UIView *views;
@end

@implementation LTOVEButtionViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    self.navigationController.navigationBar.delegate = self;
    self.view.backgroundColor = [UIColor whiteColor];
    // Do any additional setup after loading the view.
//    self.navigationController.navigationBar.delegate = self;
    LTOVEButtion *btn = [LTOVEButtion buttonWithType:UIButtonTypeCustom];
    [btn setTitle:@"团购" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    [btn setImage:[UIImage imageNamed:@"health_medal_background"] forState:UIControlStateNormal];

    btn.backgroundColor = [UIColor orangeColor];
    btn.position = LTImageViewTop;
    btn.imageInsets = UIEdgeInsetsMake(5, 0, 0, 5);
    btn.imageViewSize = CGSizeMake(0, 50);
    btn.titleLabelInsets = UIEdgeInsetsMake(50, 0.01, 10, 0.01);
//    [btn sizeToFit];
    btn.badgeValue =100;
    btn.badgeMaxValue = 50;
    btn.BadgeTextContentOffset = 10;
    btn.badgeBorderWidth = 2;
    btn.badgeBorderColor = [UIColor orangeColor];
    btn.badgeBackground = [UIColor whiteColor];
    btn.layer.cornerRadius = 20;
//    btn.layer.masksToBounds = YES;
    btn.badgeTextColor = [UIColor greenColor];
    btn.badgeFont = [UIFont systemFontOfSize:30];
    [self.view addSubview:btn];
    
    btn.center = self.view.center;

    
    btn.height = 90;
    btn.width = 100;

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



- (BOOL)navigationShouldPopOnBackButton{
    NSLog(@"aaaa");
    return YES;
}

@end
